import 'package:flutter/material.dart';
import './pages/tabs.dart';
import './pages/NameRouter/news.dart';
import './pages/NameRouter/form.dart';
import './pages/NameRouter/category.dart';

//ListView列表组件
void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      // home: MyTabs(),
      initialRoute: '/', //默认首页
      // 配置路由
      routes: {
        '/': (context) => MyTabs(),
        '/news': (context) => NewsPage(),
        // '/form': (context) => FormPage(),
        '/category': (context) => CategoryPage(),
      },
    );
  }
}
